package com.klun.tree.utils;


import com.klun.common.Node;

public class CreateTree {

    public static Node createBinaryTree(){
        /*创建一个二叉树*/
        Node root = new Node(1);
        root.left = new Node(2);
        root.left.left = new Node(3);
        root.left.right = new Node(4);
        root.left.left.left = new Node(5);
        root.right = new Node(6);
        root.right.left = new Node(7);
        root.right.right = new Node(8);
        /**
         1
         /   \
         2		6
         /  \    /  \
         3		4 7		8
         /
         5
         */
        return root;
    }
}
